@extends('layouts.admin')
@section('title')
    <title>article编辑</title>
@endsection
@section('content')
    @include('layouts.left')
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                shoparticle编辑
                <small>Control panel</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> 主页</a></li>
                <li class="active">Dashboard</li>
            </ol>
        </section>
        <!-- Main content -->
        <section class="content">
            <div class="row">
                <!-- left column -->
                <div class="col-md-offset-2 col-md-8">
                    @if(session('info'))
                        <div class="alert alert-warning alert-dismissible">
                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                            <h4><i class="icon fa fa-warning"></i> Alert!</h4>
                            {{ session('info') }}
                        </div>
                    @endif
                    @if(count($errors)>0)
                        <div class="alert alert-danger alert-dismissible">
                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                            <h4><i class="icon fa fa-ban"></i> 警告</h4>
                            <ul>
                                @foreach($errors -> all() as $error)
                                    <li >{{ $error }}</li>
                                @endforeach
                            </ul>
                        </div>
                @endif
                <!-- general form elements -->
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title">快速编辑</h3>
                        </div>
                        <!-- /.box-header -->
                        <!-- form start -->
                        <form  action="{{ url('shopcoupon') }}/{{$datas['cid']}}" method="post" >
                            {{ csrf_field() }}
                           <input type="hidden" name="_method" value="PUT">
                            {{--把原封面图片的路径存到隐藏域中--}}
                            <div class="box-body">
                                <div class="form-group">
                                    <label>token</label>
                                    <input type="text" class="form-control"  required name="token" value="{{ $datas['token'] }}" >
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputPassword1">标题</label>
                                    <input type="text" class="form-control"  required name="title" value="{{ $datas['title'] }}" >
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">类型</label>
                                    <select class="form-control" name="type" >
                                        <option value="1">正常</option>
                                        <option value="2">禁用</option>
                                        <option value="3">3</option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputPassword1">值</label>
                                        <input type="text" class="form-control" vname="value" value="{{ $datas['value'] }}">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputPassword1">giftname</label>
                                    <input type="text" class="form-control"   name="giftname"  value="{{ $datas['giftname'] }}">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">asrule</label>
                                    <select class="form-control" name="asrule" >
                                        <option value="1">1</option>
                                        <option value="2">2</option>
                                        <option value="3">3</option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputPassword1">maxmoney</label>
                                    <input type="text" class="form-control"   name="maxmoney"  value="{{ $datas['maxmoney']  }}">
                                </div>

                                <div class="form-group">
                                    <label for="exampleInputEmail1">状态</label>
                                    <select class="form-control" name="status" >
                                        <option value="1">1</option>
                                        <option value="0">2</option>
                                    </select>
                                </div>
                                <!-- /.box-body -->
                                <div class="box-footer">
                                    <button type="submit" class="btn btn-primary">提交</button>
                                </div>
                        </form>
                    </div>
                    <!-- /.box -->
                </div>
                <!--/.col (left) -->
            </div>
        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->
    <!-- 在这里 写js函数start-->
    <script type="text/javascript">

    </script>
    <!--在这里  写js函数end-->
@endsection


